/**
* Copyright (C) 2008 Happy Fish / YuQing
*
* FastDFS may be copied only under the terms of the GNU General
* Public License V3, which may be found in the FastDFS source kit.
* Please visit the FastDFS Home Page http://www.csource.org/ for more detail.
**/

//global.h

#ifndef _GLOBAL_H
#define _GLOBAL_H

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <pthread.h>
#include "common_define.h"
#include "fnio_define.h"
#include "fnio_types.h"
#include "fdht_types.h"

#ifdef __cplusplus
extern "C" {
#endif

extern int g_network_timeout;
extern char g_base_path[MAX_PATH_SIZE];
extern Version g_version;

extern bool g_continue_flag;

extern int g_server_mode;
extern int g_proxy_client_port;
extern int g_proxy_server_port;
extern int g_max_connections;
extern int g_min_buff_size;
extern int g_max_buff_size;
extern int g_max_pkg_size;
extern int g_sync_log_buff_interval;
extern int g_server_work_threads;

extern struct timeval g_network_tv;
extern struct event_base *g_event_base;

extern int g_allow_ip_count;  /* -1 means match any ip address */
extern in_addr_t *g_allow_ip_addrs;  /* sorted array, asc order */

extern GroupArray g_group_array;

#ifdef __cplusplus
}
#endif

#endif

